package java68_2;

import java.util.Scanner;

public class BuyClothes {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int count=0;
        //标记
        huijia:for(int i=1;i<=5;i++){
            System.out.println("进入了第"+i+"家店!");
            for(int j=1;j<=3;j++){
                System.out.println("要离开?");
                String answer=in.next();
                if(answer.equals("y"))
                    break huijia;

                count++;
                System.out.println("买了一件");
            }
        }
        System.out.println("买了"+count+"件");
    }
}
